package field;
import java.util.Random;

public class Luck extends Field {
	
	private String[] luckDesc;
	
	public Luck(String title, String subtitle, String desc,int fieldnmb, String[] luckDesc) {
		super(title, subtitle, desc, fieldnmb);
		this.luckDesc=luckDesc;
	}
	
	/**
	 * Genererer tilfældigt tal mellem 1-5
	 * @return
	 */

	public int getNumber(){
		int output;
		Random random = new Random();
		output = random.nextInt(6)+1;
		return output;
	}
	
	/**
	 * Genererer tilfældigt tal mellem 1-4
	 * @return
	 */

	public int getPos(){
		int output;
		Random random = new Random();
		output = random.nextInt(5)+1;
		return output;
	}
	/**
	 * Genererer tilfældigt beløb mellem 200-3000
	 * @return
	 */

	public int getAmount(){
		int output;
		Random random = new Random();
		output = (random.nextInt(28)+2)*100;
		return output;	
	}
	/**
	 * Henter beskrivelse af lykkekort, der passer til case i switchen. 
	 * @param n
	 * @return
	 */
	
	public String getLuckDesc(int n){
		String output;
		output = luckDesc[n];
		return output;
	}
	

}
